writing the methods